package com.fb.academy.controller;

import com.fb.academy.service.AcademySpecialService;
import com.fb.common.messagehandler.JsonStandardMsgBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author why
 * @date 2019/3/12 0012.
 */
@RestController
public class AcademyCopyWriterSearchController {

    @Autowired
    private DiscoveryClient discoveryClient;

    @Autowired
    private AcademySpecialService academySpecialService;

    @RequestMapping("/showCopyWriter")
    public String showCopyWriter(){
        List<String> services = discoveryClient.getServices();
        return JsonStandardMsgBean.getMsgJsonWithData(services);
    }

    @RequestMapping("/abc")
    public String showCopyWriter2(){
        List<String> services = discoveryClient.getServices();
        return JsonStandardMsgBean.getMsgJsonWithData(services);
    }
}
